
<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Add search functionality in DataGrid - jQuery EasyUI Demo</title>
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
    <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
    <style>
        .datagrid{
            margin:20px auto;
        }
    </style>
    <script type="text/javascript">

        function doSearch(){
            var email = $('#email').val().trim();
            var so = $('#so').val().trim();
            if(!email&&!so){
                alert("email and so is empty");
                return;
            }
            $('#tt').datagrid({
                method:"POST",
                contentType: "application/json",
                url: "/v3/getVSoInfoList",
                queryParams: {
                email: email,
                so: so
                },
            });
        }
    </script>
</head>
<body>
<h2> </h2>
<div style="margin-bottom:10px">
    <p> </p>
</div>

<table id="tt" class="easyui-datagrid" style="width:700px;min-height:200px;max-height:600px"
       title="Searching" iconCls="icon-search" toolbar="#tb"
       rownumbers="true" pagination="false" >
    <thead>
    <tr>
        <th field="so" width="80" align="center">订单编号</th>
        <th field="org" width="120" align="center">部门</th>
        <th field="salePhone" width="120" align="center">联系方式</th>
        <th field="email" width="240" align="center">邮箱</th>
    </tr>
    </thead>
</table>
<div id="tb" style="padding:3px">
    <span>so:</span>
    <input id="so" style="line-height:22px;border:1px solid #ccc">
    <span>Email:</span>
    <input id="email" style="line-height:22px;border:1px solid #ccc">

    <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">Search</a>
</div>
</body>
</html>